const fs = require('fs');
const path = require('path');

let url = path.resolve(__dirname,'test');
let stat = fs.statSync(url);
console.log('是否是目录：'+stat.isFile());
console.log(path.basename('keys'));
console.log(path.dirname('stat.js'));  // .
let pwd = process.cwd();
console.log(path.basename(pwd));